import TabsView from '@/layouts/tabs/TabsView'
import BlankView from '@/layouts/BlankView'
// import PageView from '@/layouts/PageView'

// 路由配置
const options = {
  routes: [{
    path: '/login',
    name: '登录页',
    component: () => import('@/pages/login')
  },
  {
    path: '*',
    name: '404',
    component: () => import('@/pages/exception/404')
  },
  {
    path: '/403',
    name: '403',
    component: () => import('@/pages/exception/403')
  },
  {
    path: '/lock',
    name: 'lock',
    component: () => import('@/views/Lock')
  },
  {
    path: 'todo',
    name: '待办事项',
    meta: {
      invisible: true
    },
    component: TabsView,
    children: [{
      path: 'message',
      name: '待办事项',
      meta: {
        invisible: true
      },
      component: () => import('@/views/message/messageManagementList')
    }]

  },
  {
    path: '/',
    name: '系统首页',
    component: TabsView,
    redirect: '/home',
    children: [{
      path: 'setting',
      name: '设置',
      meta: {
        invisible: true
      },
      component: () => import('@/views/Setting')
    },
    {
      path: 'home',
      name: '首页',
      meta: {
        invisible: true
      },
      component: () => import('@/views/home/Home')
    },
    {
      path: '/device',
      name: '导入',
      meta: {
        page: {
          closable: false
        },
        icon: 'icon-shebei',
        authority: '/device'
      },
      component: BlankView,
      children: [{
        path: '/device/deviceManager',
        name: '导入管理',
        meta: {
          authority: '/device/deviceManager'
        },
        component: BlankView,
        children: [
          // {
          // path: '/vehicle/deviceManager/device',
          // name: '设备管理',
          // meta: {
          //   authority: '/vehicle/deviceManager/device'
          // },
          // component: () => import('@/views/device/deviceManagement')
          // },
          {
            path: '/vehicle/deviceLibraryManager/deviceLibrary',
            name: '批量导入名单',
            meta: {
              authority: '/vehicle/deviceLibraryManager/deviceLibrary'
            },
            component: () => import('@/views/device/deviceStore')
          }
        ]
      }]
    },
    // {
    //   path: '/hardware',
    //   name: '硬件',
    //   meta: {
    //     page: {
    //       closable: false
    //     },
    //     icon: 'icon-yingjian',
    //     authority: '/hardware'
    //   },
    //   component: BlankView,
    //   children: [{
    //     path: '/hardware/hardwareManager',
    //     name: '硬件管理',
    //     meta: {
    //       authority: '/hardware/hardwareManager'
    //     },
    //     component: BlankView,
    //     children: [{
    //       path: '/vehicle/hardware/device',
    //       name: '手持设备管理',
    //       meta: {
    //         authority: '/vehicle/hardware/device'
    //       },
    //       component: () => import('@/views/hardware/hardwareDevice')
    //     }, {
    //       path: '/vehicle/device/query/show',
    //       name: '手持设备查询记录',
    //       meta: {
    //         authority: '/vehicle/device/query/show'
    //       },
    //       component: () => import('@/views/hardware/hardwareDeviceRecords')
    //     }
    //     ]
    //   }]
    // },
    // {
    //   path: '/warning',
    //   name: '预警',
    //   meta: {
    //     page: {
    //       closable: false
    //     },
    //     icon: 'icon-yujing',
    //     authority: '/warning'
    //   },
    //   component: BlankView,
    //   children: [{
    //     path: '/warning/warningManager',
    //     name: '预警管理',
    //     meta: {
    //       authority: '/warning/warningManager'
    //     },
    //     component: BlankView,
    //     children: [{
    //       path: '/vehicle/deviceManager/alert',
    //       name: '车辆报警',
    //       meta: {
    //         authority: '/vehicle/deviceManager/alert'
    //       },
    //       component: () => import('@/views/warning/VehiclePolice')
    //     }, {
    //       path: '/vehicle/deviceManager/testLog',
    //       name: '测试记录',
    //       meta: {
    //         authority: '/vehicle/deviceManager/testLog'
    //       },
    //       component: () => import('@/views/warning/testRecord')
    //     }, {
    //       path: '/customerService/customerServiceManager/fence/warning',
    //       name: '电子围栏预警',
    //       meta: {
    //         authority: '/customerService/customerServiceManager/fence/warning'
    //       },
    //       component: () => import('@/views/warning/electronicWarn')
    //     }
    //     ]
    //   }]
    // },
    {
      path: '/approve',
      name: '管理员',
      meta: {
        page: {
          closable: false
        },
        icon: 'icon-shenhe',
        authority: '/approve'
      },
      component: BlankView,
      children: [{
        path: '/approve/approveManager',
        name: '管理员管理',
        meta: {
          authority: '/approve/approveManager'
        },
        component: BlankView,
        children: [{
          path: '/approve/approveManager/changeAudit',
          name: '管理员管理列表',
          meta: {
            authority: '/approve/approveManager/changeAudit'
          },
          component: () => import('@/views/approve/deviceChangeAudit')
        }
        ]
      }]
    },
    {
      path: '/sales',
      name: '名单',
      meta: {
        page: {
          closable: false
        },
        icon: 'icon-shouhou',
        authority: '/sales'
      },
      component: BlankView,
      children: [{
        path: '/sales/salesManager',
        name: '名单管理',
        meta: {
          authority: '/sales/salesManager'
        },
        component: BlankView,
        children: [{
          path: '/sales/salesManager/deviceBackRepair',
          name: '名单列表',
          meta: {
            authority: '/sales/salesManager/deviceBackRepair'
          },
          component: () => import('@/views/sales/deviceBackRepair')
        }
        ]
      }
      ]
    },
    {
      path: '/data',
      name: '新增',
      meta: {
        page: {
          closable: false
        },
        icon: 'icon-tongjiguanli',
        authority: '/data'
      },
      component: BlankView,
      children: [
        {
          path: '/data/data',
          name: '新增管理',
          meta: {
            authority: '/data/data'
          },
          component: BlankView,
          children: [{
            path: '/data/data/offlineData',
            name: '添加新名单',
            meta: {
              authority: '/data/data/offlineData'
            },
            component: () => import('@/views/data/offlineData')
          }
          ]
        }
      ]
    }]
  }]
}
export default options
